﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.IO;
using System.Windows.Xps.Packaging;

namespace WPF_DbCenter.SqlServer
{
    /// <summary>
    /// Interaction logic for ConnectionString_Help.xaml
    /// </summary>
    public partial class ConnectionString_Help : Window
    {

        public ConnectionString_Help()
        {
            InitializeComponent();
            string HelpFile = AppDomain.CurrentDomain.SetupInformation.ApplicationBase+@"Help\SqlServer\CS.xps";
            if (File.Exists(HelpFile))
            {
                XpsDocument document = new XpsDocument(HelpFile, System.IO.FileAccess.Read);

                FixedDocument doc = new FixedDocument();
                FixedDocumentSequence fixedDoc = document.GetFixedDocumentSequence();
                documentViewer1.Document = fixedDoc;
                documentViewer1.FitToHeight();
            }
        }
    }
}
